.class Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;
.super Lcom/burstly/lib/component/networkcomponent/burstly/AbstractBurstlyAdaptor;
.source "BurstlyBaseScriptAdaptor.java"

# interfaces
.implements Lcom/burstly/lib/component/networkcomponent/burstly/html/WebViewFactory$IFactoryCallback;
.implements Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer$IOverlayListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor$InterstitialLoadedWebViewClient;
    }
.end annotation


# static fields
.field static final FULLSCREEN_INFO:Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo; = null

.field private static final HTML_WRAPPER:Ljava/lang/String; = "<html><head><meta name=\'viewport\' content=\'user-scalable=no initial-scale=1.0\' /><title>Advertisement</title></head><body style=\"margin:0; padding:0; overflow:hidden; background-color:transparent;\"><div align=\"center\">?</div></body></html>"

.field protected static final LOG:Lcom/burstly/lib/util/LoggerExt; = null

.field protected static final NETWORK_NAME:Ljava/lang/String; = "burstlyScript"


# instance fields
.field mCancelShow:Z

.field protected mDataToPost:Ljava/lang/String;

.field private mFullscreen:Z

.field private mPrecacheInterstitialRequest:Z

.field protected mScriptContent:Ljava/lang/String;

.field private mScriptFullscreen:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay",
            "<*>;"
        }
    .end annotation
.end field

.field private mSkipPause:Z

.field protected mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

.field private mWebView:Lcom/burstly/lib/util/UiSafeWebView;


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 55
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->LOG:Lcom/burstly/lib/util/LoggerExt;

    .line 65
    new-instance v0, Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;

    const-string v1, "burstlyScript"

    const/4 v2, 0x0

    invoke-direct {v0, v1, v2}, Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;-><init>(Ljava/lang/String;Z)V

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->FULLSCREEN_INFO:Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;

    return-void
.end method

.method constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 2
    .parameter "context"
    .parameter "viewId"

    .prologue
    .line 164
    invoke-direct {p0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/AbstractBurstlyAdaptor;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    .line 165
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "BurstlyScriptAdaptor"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mTag:Ljava/lang/String;

    .line 166
    return-void
.end method

.method static synthetic access$000(Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 49
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->isDestroyed()Z

    move-result v0

    return v0
.end method

.method private configureCommon(Lcom/burstly/lib/util/UiSafeWebView;)V
    .locals 1
    .parameter "view"

    .prologue
    .line 382
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getLayoutParamsResolver()Lcom/burstly/lib/component/LayoutParametersResolver;

    move-result-object v0

    invoke-virtual {v0}, Lcom/burstly/lib/component/LayoutParametersResolver;->resolveParameters()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/burstly/lib/util/UiSafeWebView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 383
    invoke-virtual {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->setWebView(Lcom/burstly/lib/util/UiSafeWebView;)V

    .line 384
    return-void
.end method

.method private createComponent()V
    .locals 9

    .prologue
    .line 336
    new-instance v2, Lcom/burstly/lib/component/networkcomponent/burstly/html/WebViewFactory;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v4

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getFullResponse()Lcom/burstly/lib/network/beans/ResponseBean;

    move-result-object v5

    invoke-direct {v2, v3, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/WebViewFactory;-><init>(Landroid/content/Context;Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;Lcom/burstly/lib/network/beans/ResponseBean;)V

    .line 337
    .local v2, mViewHolder:Lcom/burstly/lib/component/networkcomponent/burstly/html/WebViewFactory;
    iget-boolean v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    invoke-virtual {v2, p0, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/WebViewFactory;->createImplementation(Lcom/burstly/lib/component/networkcomponent/burstly/html/WebViewFactory$IFactoryCallback;Z)V

    .line 338
    iget-boolean v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    if-nez v3, :cond_0

    .line 339
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v4

    new-instance v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptBannerWebClient;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v3

    check-cast v3, Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;

    const-string v6, "burstlyScript"

    iget-boolean v7, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    iget-object v8, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    invoke-direct {v5, v3, v6, v7, v8}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptBannerWebClient;-><init>(Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;Ljava/lang/String;ZLcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;)V

    invoke-virtual {v4, v5}, Lcom/burstly/lib/util/UiSafeWebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 349
    :goto_0
    return-void

    .line 343
    :cond_0
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;

    .line 344
    .local v0, adaptorListener:Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;
    new-instance v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;

    const-string v3, "burstlyScript"

    const/4 v4, 0x1

    iget-object v5, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    invoke-direct {v1, v0, v3, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;-><init>(Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;Ljava/lang/String;ZLcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;)V

    .line 346
    .local v1, client:Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v3

    new-instance v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor$InterstitialLoadedWebViewClient;

    invoke-direct {v4, p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor$InterstitialLoadedWebViewClient;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;Landroid/webkit/WebViewClient;)V

    invoke-virtual {v3, v4}, Lcom/burstly/lib/util/UiSafeWebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    goto :goto_0
.end method

.method private getRequest(Ljava/lang/String;)V
    .locals 1
    .parameter "url"

    .prologue
    .line 278
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/burstly/lib/util/UiSafeWebView;->loadUrl(Ljava/lang/String;)V

    .line 279
    return-void
.end method

.method private setFullscreen(Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;)V
    .locals 3
    .parameter "responseData"

    .prologue
    const/4 v2, 0x1

    .line 201
    invoke-virtual {p1}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getIsInterstital()Ljava/lang/Integer;

    move-result-object v0

    .line 202
    .local v0, isFullScreen:Ljava/lang/Integer;
    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    iput-boolean v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    .line 204
    iget-boolean v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    if-nez v1, :cond_0

    .line 206
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getFullResponse()Lcom/burstly/lib/network/beans/ResponseBean;

    move-result-object v1

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/ResponseBean;->getOffer()Ljava/lang/Integer;

    move-result-object v0

    .line 207
    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    iput-boolean v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    .line 209
    :cond_0
    return-void
.end method

.method private static wrapHtmlIfNeed(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "content"

    .prologue
    .line 188
    const-string v0, "<html"

    invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "<HTML"

    invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "ormma"

    invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 189
    const-string v0, "<html><head><meta name=\'viewport\' content=\'user-scalable=no initial-scale=1.0\' /><title>Advertisement</title></head><body style=\"margin:0; padding:0; overflow:hidden; background-color:transparent;\"><div align=\"center\">?</div></body></html>"

    const-string v1, "?"

    invoke-virtual {v0, v1, p0}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p0

    .line 191
    .end local p0
    :cond_0
    return-object p0
.end method


# virtual methods
.method protected checkParameters(Ljava/util/Map;)V
    .locals 3
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "*>;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalArgumentException;
        }
    .end annotation

    .prologue
    .line 170
    .local p1, paramsFromServer:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;*>;"
    invoke-super {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/AbstractBurstlyAdaptor;->checkParameters(Ljava/util/Map;)V

    .line 171
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v0

    .line 172
    .local v0, responseData:Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;
    invoke-direct {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->setFullscreen(Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;)V

    .line 173
    new-instance v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    invoke-virtual {v0}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getUrl()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;-><init>(Ljava/lang/String;)V

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    .line 174
    invoke-virtual {v0}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getData()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->wrapHtmlIfNeed(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptContent:Ljava/lang/String;

    .line 175
    invoke-virtual {v0}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getData()Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mDataToPost:Ljava/lang/String;

    .line 176
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;->getUrl()Ljava/lang/String;

    move-result-object v1

    if-nez v1, :cond_0

    .line 177
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptContent:Ljava/lang/String;

    const-string v2, "Script content is null"

    invoke-static {v1, v2}, Lcom/burstly/lib/util/Utils;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 179
    :cond_0
    return-void
.end method

.method protected createFullscreenOverlay()Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay",
            "<*>;"
        }
    .end annotation

    .prologue
    .line 378
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;-><init>(Lcom/burstly/lib/util/UiSafeWebView;)V

    return-object v0
.end method

.method public defaultViewCreated(Lcom/burstly/lib/util/UiSafeWebView;)V
    .locals 6
    .parameter "view"

    .prologue
    .line 403
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->configureCommon(Lcom/burstly/lib/util/UiSafeWebView;)V

    .line 404
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;

    .line 405
    .local v0, adaptorListener:Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v1

    new-instance v2, Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;

    const-string v3, "burstlyScript"

    const/4 v4, 0x1

    iget-object v5, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    invoke-direct {v2, v0, v3, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/RedirectClickListener;-><init>(Lcom/burstly/lib/component/AbstractAdaptor$AdaptorListenerWrapper;Ljava/lang/String;ZLcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;)V

    invoke-virtual {v1, v2}, Lcom/burstly/lib/util/UiSafeWebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 406
    return-void
.end method

.method public destroy()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 301
    invoke-super {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/AbstractBurstlyAdaptor;->destroy()V

    .line 302
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v0

    .line 303
    .local v0, view:Landroid/webkit/WebView;
    if-eqz v0, :cond_0

    instance-of v1, v0, Lcom/burstly/lib/component/networkcomponent/IActivityLifeCycleAware;

    if-eqz v1, :cond_0

    .line 304
    check-cast v0, Lcom/burstly/lib/component/networkcomponent/IActivityLifeCycleAware;

    .end local v0           #view:Landroid/webkit/WebView;
    invoke-interface {v0, v2}, Lcom/burstly/lib/component/networkcomponent/IActivityLifeCycleAware;->onDestroy(Landroid/app/Activity;)V

    .line 305
    invoke-virtual {p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->setWebView(Lcom/burstly/lib/util/UiSafeWebView;)V

    .line 307
    :cond_0
    return-void
.end method

.method protected doGetNewAd()Landroid/view/View;
    .locals 8

    .prologue
    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 237
    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mCancelShow:Z

    .line 238
    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mPrecacheInterstitialRequest:Z

    .line 239
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->createComponent()V

    .line 240
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v0

    invoke-virtual {v0}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getDataType()Ljava/lang/Integer;

    move-result-object v0

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->getDataTypeByCode(Ljava/lang/Integer;)Lcom/burstly/lib/network/beans/CreativeDataType;

    move-result-object v6

    .line 241
    .local v6, currentType:Lcom/burstly/lib/network/beans/CreativeDataType;
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;->getUrl()Ljava/lang/String;

    move-result-object v7

    .line 242
    .local v7, url:Ljava/lang/String;
    if-nez v7, :cond_0

    .line 243
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v0

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptContent:Ljava/lang/String;

    const-string v4, "utf-8"

    move-object v3, v1

    move-object v5, v1

    invoke-virtual/range {v0 .. v5}, Lcom/burstly/lib/util/UiSafeWebView;->loadDataWithBaseURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 244
    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptContent:Ljava/lang/String;

    .line 252
    :goto_0
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    if-eqz v0, :cond_2

    .line 255
    :goto_1
    return-object v1

    .line 246
    :cond_0
    sget-object v0, Lcom/burstly/lib/network/beans/CreativeDataType;->CreativeDataType_redirect:Lcom/burstly/lib/network/beans/CreativeDataType;

    if-ne v6, v0, :cond_1

    .line 247
    invoke-direct {p0, v7}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getRequest(Ljava/lang/String;)V

    goto :goto_0

    .line 249
    :cond_1
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mDataToPost:Ljava/lang/String;

    invoke-virtual {p0, v7, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->postRequest(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 255
    :cond_2
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v1

    goto :goto_1
.end method

.method public getAdType()Lcom/burstly/lib/component/IBurstlyAdaptor$BurstlyAdType;
    .locals 1

    .prologue
    .line 311
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    if-eqz v0, :cond_0

    sget-object v0, Lcom/burstly/lib/component/IBurstlyAdaptor$BurstlyAdType;->INTERSTITIAL_AD_TYPE:Lcom/burstly/lib/component/IBurstlyAdaptor$BurstlyAdType;

    :goto_0
    return-object v0

    :cond_0
    sget-object v0, Lcom/burstly/lib/component/IBurstlyAdaptor$BurstlyAdType;->BANNER_AD_TYPE:Lcom/burstly/lib/component/IBurstlyAdaptor$BurstlyAdType;

    goto :goto_0
.end method

.method public getNetworkName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 316
    const-string v0, "burstlyScript"

    return-object v0
.end method

.method public getResponseHandler()Lcom/burstly/lib/component/ITrackClickResponseHandler;
    .locals 4

    .prologue
    .line 213
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptClickResponseHandler;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getState()Lcom/burstly/lib/component/ComponentState;

    move-result-object v2

    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mUrlProvider:Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;

    invoke-direct {v0, v1, v2, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptClickResponseHandler;-><init>(Landroid/content/Context;Lcom/burstly/lib/component/ComponentState;Lcom/burstly/lib/component/networkcomponent/burstly/html/UrlProvider;)V

    return-object v0
.end method

.method protected getWebView()Lcom/burstly/lib/util/UiSafeWebView;
    .locals 1

    .prologue
    .line 414
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mWebView:Lcom/burstly/lib/util/UiSafeWebView;

    return-object v0
.end method

.method public isFullscreen()Z
    .locals 1

    .prologue
    .line 432
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    return v0
.end method

.method public isPrecacheInterstitialRequest()Z
    .locals 1

    .prologue
    .line 470
    iget-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mPrecacheInterstitialRequest:Z

    return v0
.end method

.method public mraidViewCreated(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;)V
    .locals 0
    .parameter "view"

    .prologue
    .line 398
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->configureCommon(Lcom/burstly/lib/util/UiSafeWebView;)V

    .line 399
    return-void
.end method

.method public onCloseOverlay()V
    .locals 2

    .prologue
    .line 457
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->isStopped()Z

    move-result v0

    if-nez v0, :cond_0

    .line 458
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v0

    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->FULLSCREEN_INFO:Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;

    invoke-interface {v0, v1}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->dismissedFullscreen(Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;)V

    .line 459
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mWebView:Lcom/burstly/lib/util/UiSafeWebView;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    invoke-virtual {v1, v0}, Lcom/burstly/lib/util/UiSafeWebView;->onDestroy(Landroid/app/Activity;)V

    .line 460
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    .line 462
    :cond_0
    return-void
.end method

.method protected onInterstitialHtmlLoaded()V
    .locals 5

    .prologue
    .line 355
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptFullscreen:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    .line 356
    .local v0, overlay:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;,"Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay<*>;"
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->createFullscreenOverlay()Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    move-result-object v1

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptFullscreen:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    .line 357
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptFullscreen:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    invoke-virtual {v1, p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;->setOverlayListener(Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer$IOverlayListener;)V

    .line 358
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptFullscreen:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v2

    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getInterstitialShowtime()Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;->setInterstitialShowtime(Ljava/lang/Integer;)V

    .line 359
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->isStopped()Z

    move-result v1

    if-nez v1, :cond_0

    .line 360
    iget-boolean v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mPrecacheInterstitialRequest:Z

    if-nez v1, :cond_2

    .line 361
    if-eqz v0, :cond_1

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;->isShowing()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 362
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v1

    const-string v2, "burstlyScript"

    iget-boolean v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    const-string v4, "An interstitial is already showing"

    invoke-interface {v1, v2, v3, v4}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->failedToLoad(Ljava/lang/String;ZLjava/lang/String;)V

    .line 370
    :cond_0
    :goto_0
    return-void

    .line 364
    :cond_1
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptFullscreen:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;->showOverlayed()V

    goto :goto_0

    .line 367
    :cond_2
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v1

    const-string v2, "burstlyScript"

    const/4 v3, 0x1

    invoke-interface {v1, v2, v3}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->didLoad(Ljava/lang/String;Z)V

    goto :goto_0
.end method

.method public onShowOverlay()V
    .locals 3

    .prologue
    const/4 v2, 0x1

    .line 446
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->isStopped()Z

    move-result v1

    if-nez v1, :cond_0

    .line 447
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->setHardwareAcceleration(Landroid/view/View;)V

    .line 448
    iput-boolean v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mSkipPause:Z

    .line 449
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v0

    .line 450
    .local v0, adaptorListener:Lcom/burstly/lib/component/IBurstlyAdaptorListener;
    const-string v1, "burstlyScript"

    invoke-interface {v0, v1, v2}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->didLoad(Ljava/lang/String;Z)V

    .line 451
    sget-object v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->FULLSCREEN_INFO:Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;

    invoke-interface {v0, v1}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->shownFullscreen(Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;)V

    .line 453
    .end local v0           #adaptorListener:Lcom/burstly/lib/component/IBurstlyAdaptorListener;
    :cond_0
    return-void
.end method

.method public ormmaViewCreated(Lcom/burstly/lib/component/networkcomponent/burstly/html/ormma/OrmmaView;)V
    .locals 0
    .parameter "view"

    .prologue
    .line 393
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->configureCommon(Lcom/burstly/lib/util/UiSafeWebView;)V

    .line 394
    return-void
.end method

.method public pause()V
    .locals 2
    .annotation build Landroid/annotation/TargetApi;
        value = 0xb
    .end annotation

    .prologue
    .line 228
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v0

    .line 229
    .local v0, webView:Lcom/burstly/lib/util/UiSafeWebView;
    iget-boolean v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mSkipPause:Z

    if-nez v1, :cond_0

    if-eqz v0, :cond_0

    .line 230
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getContext()Landroid/content/Context;

    move-result-object v1

    check-cast v1, Landroid/app/Activity;

    invoke-virtual {v0, v1}, Lcom/burstly/lib/util/UiSafeWebView;->onPause(Landroid/app/Activity;)V

    .line 232
    :cond_0
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mSkipPause:Z

    .line 233
    return-void
.end method

.method protected postRequest(Ljava/lang/String;Ljava/lang/String;)V
    .locals 2
    .parameter "url"
    .parameter "params"

    .prologue
    .line 265
    const/4 v0, 0x0

    .line 266
    .local v0, paramsBytes:[B
    if-eqz p2, :cond_0

    .line 267
    invoke-static {p2}, Lcom/burstly/lib/util/Utils;->getParamsBytes(Ljava/lang/String;)[B

    move-result-object v0

    .line 269
    :cond_0
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v1

    invoke-virtual {v1, p1, v0}, Lcom/burstly/lib/util/UiSafeWebView;->postUrl(Ljava/lang/String;[B)V

    .line 270
    return-void
.end method

.method public precacheAd()Landroid/view/View;
    .locals 1

    .prologue
    .line 283
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getNewAd()Landroid/view/View;

    move-result-object v0

    return-object v0
.end method

.method public precacheInterstitialAd()V
    .locals 1

    .prologue
    .line 288
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->precacheAd()Landroid/view/View;

    .line 289
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mPrecacheInterstitialRequest:Z

    .line 290
    return-void
.end method

.method public resume()V
    .locals 2
    .annotation build Landroid/annotation/TargetApi;
        value = 0xb
    .end annotation

    .prologue
    .line 219
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getWebView()Lcom/burstly/lib/util/UiSafeWebView;

    move-result-object v0

    .line 220
    .local v0, webView:Lcom/burstly/lib/util/UiSafeWebView;
    if-eqz v0, :cond_0

    .line 221
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->getContext()Landroid/content/Context;

    move-result-object v1

    check-cast v1, Landroid/app/Activity;

    invoke-virtual {v0, v1}, Lcom/burstly/lib/util/UiSafeWebView;->onResume(Landroid/app/Activity;)V

    .line 223
    :cond_0
    return-void
.end method

.method public rewardsViewCreated(Lcom/burstly/lib/component/networkcomponent/burstly/html/rewards/RewardsView;)V
    .locals 0
    .parameter "view"

    .prologue
    .line 388
    invoke-direct {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->configureCommon(Lcom/burstly/lib/util/UiSafeWebView;)V

    .line 389
    return-void
.end method

.method protected setFullscreen(Z)V
    .locals 0
    .parameter "fullscreen"

    .prologue
    .line 441
    iput-boolean p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mFullscreen:Z

    .line 442
    return-void
.end method

.method public setPrecacheInterstitialRequest(Z)V
    .locals 0
    .parameter "precacheInterstitialRequest"

    .prologue
    .line 479
    iput-boolean p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mPrecacheInterstitialRequest:Z

    .line 480
    return-void
.end method

.method protected setWebView(Lcom/burstly/lib/util/UiSafeWebView;)V
    .locals 0
    .parameter "view"

    .prologue
    .line 423
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mWebView:Lcom/burstly/lib/util/UiSafeWebView;

    .line 424
    return-void
.end method

.method public showPrecachedInterstitialAd()V
    .locals 1

    .prologue
    .line 294
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptFullscreen:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    if-eqz v0, :cond_0

    .line 295
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mScriptFullscreen:Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/ScriptInterstitialOverlay;->showOverlayed()V

    .line 297
    :cond_0
    return-void
.end method

.method public stop()V
    .locals 1

    .prologue
    .line 326
    invoke-super {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/AbstractBurstlyAdaptor;->stop()V

    .line 327
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/BurstlyBaseScriptAdaptor;->mCancelShow:Z

    .line 328
    return-void
.end method

.method public supports(Ljava/lang/String;)Z
    .locals 1
    .parameter "action"

    .prologue
    .line 321
    const/4 v0, 0x1

    return v0
.end method
